3.1.85 \(\int \cot (c+d x) (a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x)) \, dx\) [85]

Optimal. Leaf size=147 \[ -\frac {2 a^{5/2} A \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {a}}\right )}{d}+\frac {4 \sqrt {2} a^{5/2} (A-i B) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 a^2 (A-2 i B) \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a B (a+i a \tan (c+d x))^{3/2}}{3 d} \]

[Out]

-2*a^(5/2)*A*arctanh((a+I*a*tan(d*x+c))^(1/2)/a^(1/2))/d+4*a^(5/2)*(A-I*B)*arctanh(1/2*(a+I*a*tan(d*x+c))^(1/2
)*2^(1/2)/a^(1/2))*2^(1/2)/d-2*a^2*(A-2*I*B)*(a+I*a*tan(d*x+c))^(1/2)/d+2/3*I*a*B*(a+I*a*tan(d*x+c))^(3/2)/d

________________________________________________________________________________________

Rubi [A]
time = 0.35, antiderivative size = 147, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.206, Rules used = {3675, 3681, 3561, 212, 3680, 65, 214} \begin {gather*} \frac {4 \sqrt {2} a^{5/2} (A-i B) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 a^{5/2} A \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {a}}\right )}{d}-\frac {2 a^2 (A-2 i B) \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a B (a+i a \tan (c+d x))^{3/2}}{3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]*(a + I*a*Tan[c + d*x])^(5/2)*(A + B*Tan[c + d*x]),x]

[Out]

(-2*a^(5/2)*A*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/Sqrt[a]])/d + (4*Sqrt[2]*a^(5/2)*(A - I*B)*ArcTanh[Sqrt[a + I
*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])])/d - (2*a^2*(A - (2*I)*B)*Sqrt[a + I*a*Tan[c + d*x]])/d + (((2*I)/3)*a*B*(
a + I*a*Tan[c + d*x])^(3/2))/d

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 3561

Int[Sqrt[(a_) + (b_.)*tan[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[-2*(b/d), Subst[Int[1/(2*a - x^2), x], x, Sq
rt[a + b*Tan[c + d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0]

Rule 3675

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*B*(a + b*Tan[e + f*x])^(m - 1)*((c + d*Tan[e + f*x])^(n + 1)/(d*f*
(m + n))), x] + Dist[1/(d*(m + n)), Int[(a + b*Tan[e + f*x])^(m - 1)*(c + d*Tan[e + f*x])^n*Simp[a*A*d*(m + n)
 + B*(a*c*(m - 1) - b*d*(n + 1)) - (B*(b*c - a*d)*(m - 1) - d*(A*b + a*B)*(m + n))*Tan[e + f*x], x], x], x] /;
 FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && GtQ[m, 1] &&  !LtQ[n, -1]

Rule 3680

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[b*(B/f), Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^n, x], x, Tan[e + f*x
]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && EqQ[A*b + a*B,
 0]

Rule 3681

Int[(((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)]))/((c_.) + (d_.)*tan[(
e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(A*b + a*B)/(b*c + a*d), Int[(a + b*Tan[e + f*x])^m, x], x] - Dist[(B*c
 - A*d)/(b*c + a*d), Int[(a + b*Tan[e + f*x])^m*((a - b*Tan[e + f*x])/(c + d*Tan[e + f*x])), x], x] /; FreeQ[{
a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[A*b + a*B, 0]

Rubi steps

\begin {align*} \int \cot (c+d x) (a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x)) \, dx &=\frac {2 i a B (a+i a \tan (c+d x))^{3/2}}{3 d}+\frac {2}{3} \int \cot (c+d x) (a+i a \tan (c+d x))^{3/2} \left (\frac {3 a A}{2}+\frac {3}{2} a (i A+2 B) \tan (c+d x)\right ) \, dx\\ &=-\frac {2 a^2 (A-2 i B) \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a B (a+i a \tan (c+d x))^{3/2}}{3 d}+\frac {4}{3} \int \cot (c+d x) \sqrt {a+i a \tan (c+d x)} \left (\frac {3 a^2 A}{4}+\frac {3}{4} a^2 (3 i A+4 B) \tan (c+d x)\right ) \, dx\\ &=-\frac {2 a^2 (A-2 i B) \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a B (a+i a \tan (c+d x))^{3/2}}{3 d}+(a A) \int \cot (c+d x) (a-i a \tan (c+d x)) \sqrt {a+i a \tan (c+d x)} \, dx+\left (4 a^2 (i A+B)\right ) \int \sqrt {a+i a \tan (c+d x)} \, dx\\ &=-\frac {2 a^2 (A-2 i B) \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a B (a+i a \tan (c+d x))^{3/2}}{3 d}+\frac {\left (a^3 A\right ) \text {Subst}\left (\int \frac {1}{x \sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{d}+\frac {\left (8 a^3 (A-i B)\right ) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{d}\\ &=\frac {4 \sqrt {2} a^{5/2} (A-i B) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 a^2 (A-2 i B) \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a B (a+i a \tan (c+d x))^{3/2}}{3 d}-\frac {\left (2 i a^2 A\right ) \text {Subst}\left (\int \frac {1}{i-\frac {i x^2}{a}} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{d}\\ &=-\frac {2 a^{5/2} A \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {a}}\right )}{d}+\frac {4 \sqrt {2} a^{5/2} (A-i B) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 a^2 (A-2 i B) \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a B (a+i a \tan (c+d x))^{3/2}}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(429\) vs. \(2(147)=294\).
time = 8.01, size = 429, normalized size = 2.92 \begin {gather*} \frac {e^{-2 i c} \sqrt {e^{i d x}} \left (8 (A-i B) \sinh ^{-1}\left (e^{i (c+d x)}\right )+\sqrt {2} A \left (\log \left (1-e^{i (c+d x)}\right )-\log \left (1+e^{i (c+d x)}\right )+\log \left (1-e^{i (c+d x)}+\sqrt {2} \sqrt {1+e^{2 i (c+d x)}}\right )-\log \left (1+e^{i (c+d x)}+\sqrt {2} \sqrt {1+e^{2 i (c+d x)}}\right )\right )\right ) (a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x))}{\sqrt {2} d \sqrt {\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt {1+e^{2 i (c+d x)}} \sec ^{\frac {7}{2}}(c+d x) (\cos (d x)+i \sin (d x))^{5/2} (A \cos (c+d x)+B \sin (c+d x))}+\frac {\cos ^3(c+d x) \left ((3 A-8 i B) \left (-\frac {2}{3} \cos (2 c)+\frac {2}{3} i \sin (2 c)\right )+\sec (c+d x) \left (-\frac {2}{3} i B \cos (3 c+d x)-\frac {2}{3} B \sin (3 c+d x)\right )\right ) (a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x))}{d (\cos (d x)+i \sin (d x))^2 (A \cos (c+d x)+B \sin (c+d x))} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[Cot[c + d*x]*(a + I*a*Tan[c + d*x])^(5/2)*(A + B*Tan[c + d*x]),x]

[Out]

(Sqrt[E^(I*d*x)]*(8*(A - I*B)*ArcSinh[E^(I*(c + d*x))] + Sqrt[2]*A*(Log[1 - E^(I*(c + d*x))] - Log[1 + E^(I*(c
 + d*x))] + Log[1 - E^(I*(c + d*x)) + Sqrt[2]*Sqrt[1 + E^((2*I)*(c + d*x))]] - Log[1 + E^(I*(c + d*x)) + Sqrt[
2]*Sqrt[1 + E^((2*I)*(c + d*x))]]))*(a + I*a*Tan[c + d*x])^(5/2)*(A + B*Tan[c + d*x]))/(Sqrt[2]*d*E^((2*I)*c)*
Sqrt[E^(I*(c + d*x))/(1 + E^((2*I)*(c + d*x)))]*Sqrt[1 + E^((2*I)*(c + d*x))]*Sec[c + d*x]^(7/2)*(Cos[d*x] + I
*Sin[d*x])^(5/2)*(A*Cos[c + d*x] + B*Sin[c + d*x])) + (Cos[c + d*x]^3*((3*A - (8*I)*B)*((-2*Cos[2*c])/3 + ((2*
I)/3)*Sin[2*c]) + Sec[c + d*x]*(((-2*I)/3)*B*Cos[3*c + d*x] - (2*B*Sin[3*c + d*x])/3))*(a + I*a*Tan[c + d*x])^
(5/2)*(A + B*Tan[c + d*x]))/(d*(Cos[d*x] + I*Sin[d*x])^2*(A*Cos[c + d*x] + B*Sin[c + d*x]))

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 964 vs. \(2 (119 ) = 238\).
time = 0.55, size = 965, normalized size = 6.56

method result size
default \(\text {Expression too large to display}\) \(965\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)*(a+I*a*tan(d*x+c))^(5/2)*(A+B*tan(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/6/d*a^2*((I*sin(d*x+c)+cos(d*x+c))*a/cos(d*x+c))^(1/2)*(-28*I*B*cos(d*x+c)+12*I*A*(-2*cos(d*x+c)/(cos(d*x+c)
+1))^(3/2)*2^(1/2)*arctan(1/2*2^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2))*sin(d*x+c)-12*I*A*cos(d*x+c)*sin(d
*x+c)-12*A*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(3/2)*arctanh(1/2*2^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*sin(d
*x+c)/cos(d*x+c))*2^(1/2)*cos(d*x+c)*sin(d*x+c)+12*I*B*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(3/2)*2^(1/2)*arctanh(1/
2*2^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*sin(d*x+c)/cos(d*x+c))*sin(d*x+c)+12*B*(-2*cos(d*x+c)/(cos(d*x+
c)+1))^(3/2)*arctan(1/2*2^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2))*2^(1/2)*cos(d*x+c)*sin(d*x+c)+3*I*A*(-2*
cos(d*x+c)/(cos(d*x+c)+1))^(3/2)*arctan(1/(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2))*sin(d*x+c)-12*A*(-2*cos(d*x+c)
/(cos(d*x+c)+1))^(3/2)*2^(1/2)*arctanh(1/2*2^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*sin(d*x+c)/cos(d*x+c))
*sin(d*x+c)+3*I*A*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(3/2)*arctan(1/(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2))*cos(d*x+
c)*sin(d*x+c)-3*A*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(3/2)*ln((sin(d*x+c)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)-cos
(d*x+c)+1)/sin(d*x+c))*cos(d*x+c)*sin(d*x+c)+12*B*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(3/2)*2^(1/2)*arctan(1/2*2^(1
/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2))*sin(d*x+c)-3*A*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(3/2)*ln((sin(d*x+c)*(
-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)-cos(d*x+c)+1)/sin(d*x+c))*sin(d*x+c)+32*I*B*cos(d*x+c)^2-4*I*B-12*A*cos(d*
x+c)^2+12*I*A*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(3/2)*arctan(1/2*2^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2))*2^
(1/2)*cos(d*x+c)*sin(d*x+c)-32*B*cos(d*x+c)*sin(d*x+c)+12*A*cos(d*x+c)+12*I*B*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(
3/2)*arctanh(1/2*2^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*sin(d*x+c)/cos(d*x+c))*2^(1/2)*cos(d*x+c)*sin(d*
x+c)+4*B*sin(d*x+c))/(I*sin(d*x+c)+cos(d*x+c)-1)/cos(d*x+c)

________________________________________________________________________________________

Maxima [A]
time = 0.52, size = 154, normalized size = 1.05 \begin {gather*} -\frac {6 \, \sqrt {2} {\left (A - i \, B\right )} a^{\frac {5}{2}} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) - 3 \, A a^{\frac {5}{2}} \log \left (\frac {\sqrt {i \, a \tan \left (d x + c\right ) + a} - \sqrt {a}}{\sqrt {i \, a \tan \left (d x + c\right ) + a} + \sqrt {a}}\right ) - 2 i \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {3}{2}} B a + 6 \, \sqrt {i \, a \tan \left (d x + c\right ) + a} {\left (A - 2 i \, B\right )} a^{2}}{3 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+I*a*tan(d*x+c))^(5/2)*(A+B*tan(d*x+c)),x, algorithm="maxima")

[Out]

-1/3*(6*sqrt(2)*(A - I*B)*a^(5/2)*log(-(sqrt(2)*sqrt(a) - sqrt(I*a*tan(d*x + c) + a))/(sqrt(2)*sqrt(a) + sqrt(
I*a*tan(d*x + c) + a))) - 3*A*a^(5/2)*log((sqrt(I*a*tan(d*x + c) + a) - sqrt(a))/(sqrt(I*a*tan(d*x + c) + a) +
 sqrt(a))) - 2*I*(I*a*tan(d*x + c) + a)^(3/2)*B*a + 6*sqrt(I*a*tan(d*x + c) + a)*(A - 2*I*B)*a^2)/d

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 610 vs. \(2 (112) = 224\).
time = 2.78, size = 610, normalized size = 4.15 \begin {gather*} \frac {12 \, \sqrt {2} \sqrt {\frac {{\left (A^{2} - 2 i \, A B - B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {4 \, {\left ({\left (-i \, A - B\right )} a^{3} e^{\left (i \, d x + i \, c\right )} - \sqrt {\frac {{\left (A^{2} - 2 i \, A B - B^{2}\right )} a^{5}}{d^{2}}} {\left (i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (-i \, A - B\right )} a^{2}}\right ) - 12 \, \sqrt {2} \sqrt {\frac {{\left (A^{2} - 2 i \, A B - B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {4 \, {\left ({\left (-i \, A - B\right )} a^{3} e^{\left (i \, d x + i \, c\right )} - \sqrt {\frac {{\left (A^{2} - 2 i \, A B - B^{2}\right )} a^{5}}{d^{2}}} {\left (-i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (-i \, A - B\right )} a^{2}}\right ) - 3 \, \sqrt {\frac {A^{2} a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {16 \, {\left (3 \, A a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + A a^{3} + 2 \, \sqrt {2} \sqrt {\frac {A^{2} a^{5}}{d^{2}}} {\left (d e^{\left (3 i \, d x + 3 i \, c\right )} + d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{A a}\right ) + 3 \, \sqrt {\frac {A^{2} a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {16 \, {\left (3 \, A a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + A a^{3} - 2 \, \sqrt {2} \sqrt {\frac {A^{2} a^{5}}{d^{2}}} {\left (d e^{\left (3 i \, d x + 3 i \, c\right )} + d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{A a}\right ) - 4 \, \sqrt {2} {\left ({\left (3 \, A - 8 i \, B\right )} a^{2} e^{\left (3 i \, d x + 3 i \, c\right )} + 3 \, {\left (A - 2 i \, B\right )} a^{2} e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}}{6 \, {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+I*a*tan(d*x+c))^(5/2)*(A+B*tan(d*x+c)),x, algorithm="fricas")

[Out]

1/6*(12*sqrt(2)*sqrt((A^2 - 2*I*A*B - B^2)*a^5/d^2)*(d*e^(2*I*d*x + 2*I*c) + d)*log(4*((-I*A - B)*a^3*e^(I*d*x
 + I*c) - sqrt((A^2 - 2*I*A*B - B^2)*a^5/d^2)*(I*d*e^(2*I*d*x + 2*I*c) + I*d)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)
))*e^(-I*d*x - I*c)/((-I*A - B)*a^2)) - 12*sqrt(2)*sqrt((A^2 - 2*I*A*B - B^2)*a^5/d^2)*(d*e^(2*I*d*x + 2*I*c)
+ d)*log(4*((-I*A - B)*a^3*e^(I*d*x + I*c) - sqrt((A^2 - 2*I*A*B - B^2)*a^5/d^2)*(-I*d*e^(2*I*d*x + 2*I*c) - I
*d)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-I*d*x - I*c)/((-I*A - B)*a^2)) - 3*sqrt(A^2*a^5/d^2)*(d*e^(2*I*d*x
+ 2*I*c) + d)*log(16*(3*A*a^3*e^(2*I*d*x + 2*I*c) + A*a^3 + 2*sqrt(2)*sqrt(A^2*a^5/d^2)*(d*e^(3*I*d*x + 3*I*c)
 + d*e^(I*d*x + I*c))*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-2*I*d*x - 2*I*c)/(A*a)) + 3*sqrt(A^2*a^5/d^2)*(d*
e^(2*I*d*x + 2*I*c) + d)*log(16*(3*A*a^3*e^(2*I*d*x + 2*I*c) + A*a^3 - 2*sqrt(2)*sqrt(A^2*a^5/d^2)*(d*e^(3*I*d
*x + 3*I*c) + d*e^(I*d*x + I*c))*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-2*I*d*x - 2*I*c)/(A*a)) - 4*sqrt(2)*((
3*A - 8*I*B)*a^2*e^(3*I*d*x + 3*I*c) + 3*(A - 2*I*B)*a^2*e^(I*d*x + I*c))*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))/(
d*e^(2*I*d*x + 2*I*c) + d)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+I*a*tan(d*x+c))**(5/2)*(A+B*tan(d*x+c)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+I*a*tan(d*x+c))^(5/2)*(A+B*tan(d*x+c)),x, algorithm="giac")

[Out]

integrate((B*tan(d*x + c) + A)*(I*a*tan(d*x + c) + a)^(5/2)*cot(d*x + c), x)

________________________________________________________________________________________

Mupad [B]
time = 6.97, size = 597, normalized size = 4.06 \begin {gather*} -\left (\frac {2\,a^2\,\left (A+B\,1{}\mathrm {i}\right )}{d}-\frac {B\,a^2\,6{}\mathrm {i}}{d}\right )\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}+\frac {B\,a\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{3/2}\,2{}\mathrm {i}}{3\,d}-\frac {A\,\mathrm {atan}\left (\frac {A^3\,a^8\,d\,\sqrt {a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,224{}\mathrm {i}}{-224\,d\,A^3\,a^{11}+512{}\mathrm {i}\,d\,A^2\,B\,a^{11}+256\,d\,A\,B^2\,a^{11}}-\frac {A\,B^2\,a^8\,d\,\sqrt {a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,256{}\mathrm {i}}{-224\,d\,A^3\,a^{11}+512{}\mathrm {i}\,d\,A^2\,B\,a^{11}+256\,d\,A\,B^2\,a^{11}}+\frac {512\,A^2\,B\,a^8\,d\,\sqrt {a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{-224\,d\,A^3\,a^{11}+512{}\mathrm {i}\,d\,A^2\,B\,a^{11}+256\,d\,A\,B^2\,a^{11}}\right )\,\sqrt {a^5}\,2{}\mathrm {i}}{d}+\frac {\sqrt {2}\,\mathrm {atan}\left (\frac {224\,\sqrt {2}\,A^3\,a^8\,d\,\sqrt {-a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{448\,d\,A^3\,a^{11}-1472{}\mathrm {i}\,d\,A^2\,B\,a^{11}-1536\,d\,A\,B^2\,a^{11}+512{}\mathrm {i}\,d\,B^3\,a^{11}}+\frac {\sqrt {2}\,B^3\,a^8\,d\,\sqrt {-a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,256{}\mathrm {i}}{448\,d\,A^3\,a^{11}-1472{}\mathrm {i}\,d\,A^2\,B\,a^{11}-1536\,d\,A\,B^2\,a^{11}+512{}\mathrm {i}\,d\,B^3\,a^{11}}-\frac {768\,\sqrt {2}\,A\,B^2\,a^8\,d\,\sqrt {-a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{448\,d\,A^3\,a^{11}-1472{}\mathrm {i}\,d\,A^2\,B\,a^{11}-1536\,d\,A\,B^2\,a^{11}+512{}\mathrm {i}\,d\,B^3\,a^{11}}-\frac {\sqrt {2}\,A^2\,B\,a^8\,d\,\sqrt {-a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,736{}\mathrm {i}}{448\,d\,A^3\,a^{11}-1472{}\mathrm {i}\,d\,A^2\,B\,a^{11}-1536\,d\,A\,B^2\,a^{11}+512{}\mathrm {i}\,d\,B^3\,a^{11}}\right )\,\left (B+A\,1{}\mathrm {i}\right )\,\sqrt {-a^5}\,4{}\mathrm {i}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(c + d*x)*(A + B*tan(c + d*x))*(a + a*tan(c + d*x)*1i)^(5/2),x)

[Out]

(B*a*(a + a*tan(c + d*x)*1i)^(3/2)*2i)/(3*d) - ((2*a^2*(A + B*1i))/d - (B*a^2*6i)/d)*(a + a*tan(c + d*x)*1i)^(
1/2) - (A*atan((A^3*a^8*d*(a^5)^(1/2)*(a + a*tan(c + d*x)*1i)^(1/2)*224i)/(256*A*B^2*a^11*d - 224*A^3*a^11*d +
 A^2*B*a^11*d*512i) - (A*B^2*a^8*d*(a^5)^(1/2)*(a + a*tan(c + d*x)*1i)^(1/2)*256i)/(256*A*B^2*a^11*d - 224*A^3
*a^11*d + A^2*B*a^11*d*512i) + (512*A^2*B*a^8*d*(a^5)^(1/2)*(a + a*tan(c + d*x)*1i)^(1/2))/(256*A*B^2*a^11*d -
 224*A^3*a^11*d + A^2*B*a^11*d*512i))*(a^5)^(1/2)*2i)/d + (2^(1/2)*atan((224*2^(1/2)*A^3*a^8*d*(-a^5)^(1/2)*(a
 + a*tan(c + d*x)*1i)^(1/2))/(448*A^3*a^11*d + B^3*a^11*d*512i - 1536*A*B^2*a^11*d - A^2*B*a^11*d*1472i) + (2^
(1/2)*B^3*a^8*d*(-a^5)^(1/2)*(a + a*tan(c + d*x)*1i)^(1/2)*256i)/(448*A^3*a^11*d + B^3*a^11*d*512i - 1536*A*B^
2*a^11*d - A^2*B*a^11*d*1472i) - (768*2^(1/2)*A*B^2*a^8*d*(-a^5)^(1/2)*(a + a*tan(c + d*x)*1i)^(1/2))/(448*A^3
*a^11*d + B^3*a^11*d*512i - 1536*A*B^2*a^11*d - A^2*B*a^11*d*1472i) - (2^(1/2)*A^2*B*a^8*d*(-a^5)^(1/2)*(a + a
*tan(c + d*x)*1i)^(1/2)*736i)/(448*A^3*a^11*d + B^3*a^11*d*512i - 1536*A*B^2*a^11*d - A^2*B*a^11*d*1472i))*(A*
1i + B)*(-a^5)^(1/2)*4i)/d

________________________________________________________________________________________